package com.xpgk.mvc.btraining;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import com.jfinal.log.Log;
import com.xpgk.annotation.Service;
import com.xpgk.constant.ConstantRender;
import com.xpgk.dto.RenderBean;
import com.xpgk.mvc.base.BaseService;

import oracle.sql.DATE;


@Service(name = BTrainingService.serviceName)
public class BTrainingService  extends  BaseService{
	
	@SuppressWarnings("unused")
	private static final Log log = Log.getLog(BTrainingService.class);
	public static final String serviceName = "btrainingService";	
	
	
	
	/**
	 * 保存培训信息
	 * */
	public RenderBean  saveTra(BTraining bTraining,String orgids,String userIds)
	{	
	
		RenderBean result = new RenderBean();
		String  msg="";
		bTraining.set(BTraining.column_organIds, orgids)
		.set(BTraining.column_createDate, new Date())
		.set(BTraining.column_createId, userIds);
			if(bTraining.save()){
				
				System.out.println("添加成功");
				msg=ConstantRender.render_success_code;
			
					}else{
				System.out.println("shibai ");
				msg="添加失败！";
			}
			result.getMap().put("msg", msg);
			return result;
		}
	}
	


